/**
 * Copyright (c) 2000-2011 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package doan.quanlycanbo.portlet.model;

import com.liferay.portal.kernel.bean.AutoEscapeBeanHandler;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.impl.BaseModelImpl;
import com.liferay.portal.util.PortalUtil;

import java.io.Serializable;

import java.lang.reflect.Proxy;

import java.util.Date;

/**
 * @author Nguyen Tuan Vinh
 */
public class hosoClp extends BaseModelImpl<hoso> implements hoso {
	public hosoClp() {
	}

	public long getPrimaryKey() {
		return _mahoso;
	}

	public void setPrimaryKey(long pk) {
		setMahoso(pk);
	}

	public Serializable getPrimaryKeyObj() {
		return new Long(_mahoso);
	}

	public long getMahoso() {
		return _mahoso;
	}

	public void setMahoso(long mahoso) {
		_mahoso = mahoso;
	}

	public long getGroupId() {
		return _groupId;
	}

	public void setGroupId(long groupId) {
		_groupId = groupId;
	}

	public long getCompanyId() {
		return _companyId;
	}

	public void setCompanyId(long companyId) {
		_companyId = companyId;
	}

	public String getLanguageId() {
		return _languageId;
	}

	public void setLanguageId(String languageId) {
		_languageId = languageId;
	}

	public long getUserId() {
		return _userId;
	}

	public void setUserId(long userId) {
		_userId = userId;
	}

	public String getUserUuid() throws SystemException {
		return PortalUtil.getUserValue(getUserId(), "uuid", _userUuid);
	}

	public void setUserUuid(String userUuid) {
		_userUuid = userUuid;
	}

	public long getSohieunhanvien() {
		return _sohieunhanvien;
	}

	public void setSohieunhanvien(long sohieunhanvien) {
		_sohieunhanvien = sohieunhanvien;
	}

	public String getCmtnd() {
		return _cmtnd;
	}

	public void setCmtnd(String cmtnd) {
		_cmtnd = cmtnd;
	}

	public String getHoten() {
		return _hoten;
	}

	public void setHoten(String hoten) {
		_hoten = hoten;
	}

	public String getGioitinh() {
		return _gioitinh;
	}

	public void setGioitinh(String gioitinh) {
		_gioitinh = gioitinh;
	}

	public String getDuongdananh() {
		return _duongdananh;
	}

	public void setDuongdananh(String duongdananh) {
		_duongdananh = duongdananh;
	}

	public String getTenthuongdung() {
		return _tenthuongdung;
	}

	public void setTenthuongdung(String tenthuongdung) {
		_tenthuongdung = tenthuongdung;
	}

	public Date getNgaysinh() {
		return _ngaysinh;
	}

	public void setNgaysinh(Date ngaysinh) {
		_ngaysinh = ngaysinh;
	}

	public String getNoisinh() {
		return _noisinh;
	}

	public void setNoisinh(String noisinh) {
		_noisinh = noisinh;
	}

	public String getQuequan() {
		return _quequan;
	}

	public void setQuequan(String quequan) {
		_quequan = quequan;
	}

	public String getDiachithuongtru() {
		return _diachithuongtru;
	}

	public void setDiachithuongtru(String diachithuongtru) {
		_diachithuongtru = diachithuongtru;
	}

	public String getDiachitamtru() {
		return _diachitamtru;
	}

	public void setDiachitamtru(String diachitamtru) {
		_diachitamtru = diachitamtru;
	}

	public String getDienthoai() {
		return _dienthoai;
	}

	public void setDienthoai(String dienthoai) {
		_dienthoai = dienthoai;
	}

	public String getEmail() {
		return _email;
	}

	public void setEmail(String email) {
		_email = email;
	}

	public String getQuocgia() {
		return _quocgia;
	}

	public void setQuocgia(String quocgia) {
		_quocgia = quocgia;
	}

	public Date getNgayvaodang() {
		return _ngayvaodang;
	}

	public void setNgayvaodang(Date ngayvaodang) {
		_ngayvaodang = ngayvaodang;
	}

	public String getChuyennganh1() {
		return _chuyennganh1;
	}

	public void setChuyennganh1(String chuyennganh1) {
		_chuyennganh1 = chuyennganh1;
	}

	public int getNamtncn1() {
		return _namtncn1;
	}

	public void setNamtncn1(int namtncn1) {
		_namtncn1 = namtncn1;
	}

	public String getChuyennganh2() {
		return _chuyennganh2;
	}

	public void setChuyennganh2(String chuyennganh2) {
		_chuyennganh2 = chuyennganh2;
	}

	public int getNamtncn2() {
		return _namtncn2;
	}

	public void setNamtncn2(int namtncn2) {
		_namtncn2 = namtncn2;
	}

	public String getChuyennganh3() {
		return _chuyennganh3;
	}

	public void setChuyennganh3(String chuyennganh3) {
		_chuyennganh3 = chuyennganh3;
	}

	public int getNamtncn3() {
		return _namtncn3;
	}

	public void setNamtncn3(int namtncn3) {
		_namtncn3 = namtncn3;
	}

	public long getMadonvi() {
		return _madonvi;
	}

	public void setMadonvi(long madonvi) {
		_madonvi = madonvi;
	}

	public long getMachucvu() {
		return _machucvu;
	}

	public void setMachucvu(long machucvu) {
		_machucvu = machucvu;
	}

	public long getMadantoc() {
		return _madantoc;
	}

	public void setMadantoc(long madantoc) {
		_madantoc = madantoc;
	}

	public long getMahocham() {
		return _mahocham;
	}

	public void setMahocham(long mahocham) {
		_mahocham = mahocham;
	}

	public long getMahocvi() {
		return _mahocvi;
	}

	public void setMahocvi(long mahocvi) {
		_mahocvi = mahocvi;
	}

	public long getMahesoluong() {
		return _mahesoluong;
	}

	public void setMahesoluong(long mahesoluong) {
		_mahesoluong = mahesoluong;
	}

	public long getMacapuy() {
		return _macapuy;
	}

	public void setMacapuy(long macapuy) {
		_macapuy = macapuy;
	}

	public long getMatongiao() {
		return _matongiao;
	}

	public void setMatongiao(long matongiao) {
		_matongiao = matongiao;
	}

	public long getMaxuatthan() {
		return _maxuatthan;
	}

	public void setMaxuatthan(long maxuatthan) {
		_maxuatthan = maxuatthan;
	}

	public long getMagdpt() {
		return _magdpt;
	}

	public void setMagdpt(long magdpt) {
		_magdpt = magdpt;
	}

	public long getMadanhhieu() {
		return _madanhhieu;
	}

	public void setMadanhhieu(long madanhhieu) {
		_madanhhieu = madanhhieu;
	}

	public boolean getCotendangnhap() {
		return _cotendangnhap;
	}

	public boolean isCotendangnhap() {
		return _cotendangnhap;
	}

	public void setCotendangnhap(boolean cotendangnhap) {
		_cotendangnhap = cotendangnhap;
	}

	public int getVitri() {
		return _vitri;
	}

	public void setVitri(int vitri) {
		_vitri = vitri;
	}

	public hoso toEscapedModel() {
		if (isEscapedModel()) {
			return this;
		}
		else {
			return (hoso)Proxy.newProxyInstance(hoso.class.getClassLoader(),
				new Class[] { hoso.class }, new AutoEscapeBeanHandler(this));
		}
	}

	public Object clone() {
		hosoClp clone = new hosoClp();

		clone.setMahoso(getMahoso());
		clone.setGroupId(getGroupId());
		clone.setCompanyId(getCompanyId());
		clone.setLanguageId(getLanguageId());
		clone.setUserId(getUserId());
		clone.setSohieunhanvien(getSohieunhanvien());
		clone.setCmtnd(getCmtnd());
		clone.setHoten(getHoten());
		clone.setGioitinh(getGioitinh());
		clone.setDuongdananh(getDuongdananh());
		clone.setTenthuongdung(getTenthuongdung());
		clone.setNgaysinh(getNgaysinh());
		clone.setNoisinh(getNoisinh());
		clone.setQuequan(getQuequan());
		clone.setDiachithuongtru(getDiachithuongtru());
		clone.setDiachitamtru(getDiachitamtru());
		clone.setDienthoai(getDienthoai());
		clone.setEmail(getEmail());
		clone.setQuocgia(getQuocgia());
		clone.setNgayvaodang(getNgayvaodang());
		clone.setChuyennganh1(getChuyennganh1());
		clone.setNamtncn1(getNamtncn1());
		clone.setChuyennganh2(getChuyennganh2());
		clone.setNamtncn2(getNamtncn2());
		clone.setChuyennganh3(getChuyennganh3());
		clone.setNamtncn3(getNamtncn3());
		clone.setMadonvi(getMadonvi());
		clone.setMachucvu(getMachucvu());
		clone.setMadantoc(getMadantoc());
		clone.setMahocham(getMahocham());
		clone.setMahocvi(getMahocvi());
		clone.setMahesoluong(getMahesoluong());
		clone.setMacapuy(getMacapuy());
		clone.setMatongiao(getMatongiao());
		clone.setMaxuatthan(getMaxuatthan());
		clone.setMagdpt(getMagdpt());
		clone.setMadanhhieu(getMadanhhieu());
		clone.setCotendangnhap(getCotendangnhap());
		clone.setVitri(getVitri());

		return clone;
	}

	public int compareTo(hoso hoso) {
		long pk = hoso.getPrimaryKey();

		if (getPrimaryKey() < pk) {
			return -1;
		}
		else if (getPrimaryKey() > pk) {
			return 1;
		}
		else {
			return 0;
		}
	}

	public boolean equals(Object obj) {
		if (obj == null) {
			return false;
		}

		hosoClp hoso = null;

		try {
			hoso = (hosoClp)obj;
		}
		catch (ClassCastException cce) {
			return false;
		}

		long pk = hoso.getPrimaryKey();

		if (getPrimaryKey() == pk) {
			return true;
		}
		else {
			return false;
		}
	}

	public int hashCode() {
		return (int)getPrimaryKey();
	}

	public String toString() {
		StringBundler sb = new StringBundler(79);

		sb.append("{mahoso=");
		sb.append(getMahoso());
		sb.append(", groupId=");
		sb.append(getGroupId());
		sb.append(", companyId=");
		sb.append(getCompanyId());
		sb.append(", languageId=");
		sb.append(getLanguageId());
		sb.append(", userId=");
		sb.append(getUserId());
		sb.append(", sohieunhanvien=");
		sb.append(getSohieunhanvien());
		sb.append(", cmtnd=");
		sb.append(getCmtnd());
		sb.append(", hoten=");
		sb.append(getHoten());
		sb.append(", gioitinh=");
		sb.append(getGioitinh());
		sb.append(", duongdananh=");
		sb.append(getDuongdananh());
		sb.append(", tenthuongdung=");
		sb.append(getTenthuongdung());
		sb.append(", ngaysinh=");
		sb.append(getNgaysinh());
		sb.append(", noisinh=");
		sb.append(getNoisinh());
		sb.append(", quequan=");
		sb.append(getQuequan());
		sb.append(", diachithuongtru=");
		sb.append(getDiachithuongtru());
		sb.append(", diachitamtru=");
		sb.append(getDiachitamtru());
		sb.append(", dienthoai=");
		sb.append(getDienthoai());
		sb.append(", email=");
		sb.append(getEmail());
		sb.append(", quocgia=");
		sb.append(getQuocgia());
		sb.append(", ngayvaodang=");
		sb.append(getNgayvaodang());
		sb.append(", chuyennganh1=");
		sb.append(getChuyennganh1());
		sb.append(", namtncn1=");
		sb.append(getNamtncn1());
		sb.append(", chuyennganh2=");
		sb.append(getChuyennganh2());
		sb.append(", namtncn2=");
		sb.append(getNamtncn2());
		sb.append(", chuyennganh3=");
		sb.append(getChuyennganh3());
		sb.append(", namtncn3=");
		sb.append(getNamtncn3());
		sb.append(", madonvi=");
		sb.append(getMadonvi());
		sb.append(", machucvu=");
		sb.append(getMachucvu());
		sb.append(", madantoc=");
		sb.append(getMadantoc());
		sb.append(", mahocham=");
		sb.append(getMahocham());
		sb.append(", mahocvi=");
		sb.append(getMahocvi());
		sb.append(", mahesoluong=");
		sb.append(getMahesoluong());
		sb.append(", macapuy=");
		sb.append(getMacapuy());
		sb.append(", matongiao=");
		sb.append(getMatongiao());
		sb.append(", maxuatthan=");
		sb.append(getMaxuatthan());
		sb.append(", magdpt=");
		sb.append(getMagdpt());
		sb.append(", madanhhieu=");
		sb.append(getMadanhhieu());
		sb.append(", cotendangnhap=");
		sb.append(getCotendangnhap());
		sb.append(", vitri=");
		sb.append(getVitri());
		sb.append("}");

		return sb.toString();
	}

	public String toXmlString() {
		StringBundler sb = new StringBundler(121);

		sb.append("<model><model-name>");
		sb.append("doan.quanlycanbo.portlet.model.hoso");
		sb.append("</model-name>");

		sb.append(
			"<column><column-name>mahoso</column-name><column-value><![CDATA[");
		sb.append(getMahoso());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>groupId</column-name><column-value><![CDATA[");
		sb.append(getGroupId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>companyId</column-name><column-value><![CDATA[");
		sb.append(getCompanyId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>languageId</column-name><column-value><![CDATA[");
		sb.append(getLanguageId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>userId</column-name><column-value><![CDATA[");
		sb.append(getUserId());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>sohieunhanvien</column-name><column-value><![CDATA[");
		sb.append(getSohieunhanvien());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>cmtnd</column-name><column-value><![CDATA[");
		sb.append(getCmtnd());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>hoten</column-name><column-value><![CDATA[");
		sb.append(getHoten());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>gioitinh</column-name><column-value><![CDATA[");
		sb.append(getGioitinh());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>duongdananh</column-name><column-value><![CDATA[");
		sb.append(getDuongdananh());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>tenthuongdung</column-name><column-value><![CDATA[");
		sb.append(getTenthuongdung());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>ngaysinh</column-name><column-value><![CDATA[");
		sb.append(getNgaysinh());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>noisinh</column-name><column-value><![CDATA[");
		sb.append(getNoisinh());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>quequan</column-name><column-value><![CDATA[");
		sb.append(getQuequan());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>diachithuongtru</column-name><column-value><![CDATA[");
		sb.append(getDiachithuongtru());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>diachitamtru</column-name><column-value><![CDATA[");
		sb.append(getDiachitamtru());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>dienthoai</column-name><column-value><![CDATA[");
		sb.append(getDienthoai());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>email</column-name><column-value><![CDATA[");
		sb.append(getEmail());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>quocgia</column-name><column-value><![CDATA[");
		sb.append(getQuocgia());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>ngayvaodang</column-name><column-value><![CDATA[");
		sb.append(getNgayvaodang());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>chuyennganh1</column-name><column-value><![CDATA[");
		sb.append(getChuyennganh1());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>namtncn1</column-name><column-value><![CDATA[");
		sb.append(getNamtncn1());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>chuyennganh2</column-name><column-value><![CDATA[");
		sb.append(getChuyennganh2());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>namtncn2</column-name><column-value><![CDATA[");
		sb.append(getNamtncn2());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>chuyennganh3</column-name><column-value><![CDATA[");
		sb.append(getChuyennganh3());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>namtncn3</column-name><column-value><![CDATA[");
		sb.append(getNamtncn3());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>madonvi</column-name><column-value><![CDATA[");
		sb.append(getMadonvi());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>machucvu</column-name><column-value><![CDATA[");
		sb.append(getMachucvu());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>madantoc</column-name><column-value><![CDATA[");
		sb.append(getMadantoc());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>mahocham</column-name><column-value><![CDATA[");
		sb.append(getMahocham());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>mahocvi</column-name><column-value><![CDATA[");
		sb.append(getMahocvi());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>mahesoluong</column-name><column-value><![CDATA[");
		sb.append(getMahesoluong());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>macapuy</column-name><column-value><![CDATA[");
		sb.append(getMacapuy());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>matongiao</column-name><column-value><![CDATA[");
		sb.append(getMatongiao());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>maxuatthan</column-name><column-value><![CDATA[");
		sb.append(getMaxuatthan());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>magdpt</column-name><column-value><![CDATA[");
		sb.append(getMagdpt());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>madanhhieu</column-name><column-value><![CDATA[");
		sb.append(getMadanhhieu());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>cotendangnhap</column-name><column-value><![CDATA[");
		sb.append(getCotendangnhap());
		sb.append("]]></column-value></column>");
		sb.append(
			"<column><column-name>vitri</column-name><column-value><![CDATA[");
		sb.append(getVitri());
		sb.append("]]></column-value></column>");

		sb.append("</model>");

		return sb.toString();
	}

	private long _mahoso;
	private long _groupId;
	private long _companyId;
	private String _languageId;
	private long _userId;
	private String _userUuid;
	private long _sohieunhanvien;
	private String _cmtnd;
	private String _hoten;
	private String _gioitinh;
	private String _duongdananh;
	private String _tenthuongdung;
	private Date _ngaysinh;
	private String _noisinh;
	private String _quequan;
	private String _diachithuongtru;
	private String _diachitamtru;
	private String _dienthoai;
	private String _email;
	private String _quocgia;
	private Date _ngayvaodang;
	private String _chuyennganh1;
	private int _namtncn1;
	private String _chuyennganh2;
	private int _namtncn2;
	private String _chuyennganh3;
	private int _namtncn3;
	private long _madonvi;
	private long _machucvu;
	private long _madantoc;
	private long _mahocham;
	private long _mahocvi;
	private long _mahesoluong;
	private long _macapuy;
	private long _matongiao;
	private long _maxuatthan;
	private long _magdpt;
	private long _madanhhieu;
	private boolean _cotendangnhap;
	private int _vitri;
}